Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cronjobs db changes #1229

Merged
merged 9 commits into from
Apr 12, 2024
Merged

feat: cronjobs db changes #1229

merged 9 commits into from
Apr 12, 2024

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Apr 11, 2024

Larger PR here: #1155

@matt2e matt2e mentioned this pull request Apr 11, 2024
14 tasks
@alecthomas alecthomas mentioned this pull request Apr 11, 2024
@matt2e matt2e marked this pull request as ready for review April 11, 2024 05:25
@@ -721,14 +721,14 @@ func (s *Service) CreateDeployment(ctx context.Context, req *connect.Request[ftl
}

ingressRoutes := extractIngressRoutingEntries(req.Msg)
dname, err := s.dal.CreateDeployment(ctx, ms.Runtime.Language, module, artefacts, ingressRoutes)
dkey, err := s.dal.CreateDeployment(ctx, ms.Runtime.Language, module, artefacts, ingressRoutes, nil, time.Now())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cronjob service will be asked for cron jobs based on the module schema here, but this is skipped as part of this smaller PR.
Full version here: https://github.com/TBD54566975/ftl/blob/matt2e%2Fcron-jobs/backend/controller/controller.go#L740

@matt2e matt2e force-pushed the matt2e/cron-jobs-db branch from 10819fa to 94330f3 Compare April 11, 2024 23:40
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/sql/schema/001_init.sql Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/sql/queries.sql Outdated Show resolved Hide resolved
@matt2e matt2e force-pushed the matt2e/cron-jobs-db branch 3 times, most recently from 52b539c to 076522d Compare April 12, 2024 03:48
matt2e added 8 commits April 12, 2024 13:50
# Conflicts:
#	backend/controller/dal/dal.go
# Conflicts:
#	backend/controller/cronjobs/cronjobs.go
#	backend/controller/cronjobs/cronjobs_test.go
#	backend/controller/cronjobs/state.go
# Conflicts:
#	backend/controller/dal/dal.go
# Conflicts:
#	backend/controller/dal/dal.go
@matt2e matt2e force-pushed the matt2e/cron-jobs-db branch from 076522d to 6adbbc3 Compare April 12, 2024 03:50
@matt2e matt2e requested a review from alecthomas April 12, 2024 03:57
backend/controller/dal/dal.go Outdated Show resolved Hide resolved
backend/controller/dal/dal.go Show resolved Hide resolved
@matt2e matt2e merged commit 8ca5926 into main Apr 12, 2024
12 checks passed
@matt2e matt2e deleted the matt2e/cron-jobs-db branch April 12, 2024 05:57
matt2e added a commit that referenced this pull request Apr 15, 2024
- [x] Schema changes
- [x] Module validation
- [x] Support multiple controllers using hash ring
- [x] DB indexes
- [x] Tests
    - [x] CronJobs Service
    - [x] cron lib
    - [x] schema changes

Separating into different PRs:
- [x] cron implementation: #1194
- [x] deepcopy: #1195
- [x] metadata changes #1216
- [x] db level changes: #1229 
- [ ] Afterwards: ftl-examples
- [ ] Afterwards: add event for it to show in web console

#1141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants